package com.sfeir.shared;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Transient;

/**
 * Class modelizing a Tetris Level
 * 
 * @author Oussama Zoghlami
 * @date 27/12/2011
 */
@Entity
public class Level implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1736814758390410851L;

	@Id
	private Long id;
	
	private int order;

	private Date date;

	private String sequenceJson;

	private String plateauJson;

	/**
	 * Level Sequence represented by a list of Tetris objects ID
	 */
	@Transient
	private List<Integer> sequence;

	/**
	 * List indicated the pre-fixed cases on the Tetris Matrix
	 */
	@Transient
	List<MatrixPoint> plateau;

	public Level() {
	}

	/**
	 * 
	 * @param id
	 * @param sequence
	 * @param plateau
	 */
	public Level(int order, List<Integer> sequence, List<MatrixPoint> plateau) {
		super();
		this.order = order;
		this.sequence = sequence;
		this.plateau = plateau;
		this.date = new Date();
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public List<Integer> getSequence() {
		return sequence;
	}

	public void setSequence(List<Integer> sequence) {
		this.sequence = sequence;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public String getSequenceJson() {
		return sequenceJson;
	}

	public void setSequenceJson(String sequenceJson) {
		this.sequenceJson = sequenceJson;
	}

	public String getPlateauJson() {
		return plateauJson;
	}

	public void setPlateauJson(String plateauJson) {
		this.plateauJson = plateauJson;
	}

	public List<MatrixPoint> getPlateau() {
		return plateau;
	}

	public void setPlateau(List<MatrixPoint> plateau) {
		this.plateau = plateau;
	}

	public int getOrder() {
		return order;
	}

	public void setOrder(int order) {
		this.order = order;
	}
	
}
